<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrderlistsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('orderlists', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('oid')->comment('订单id');
            $table->decimal('price', 8, 2)->comment('商品单价');
            $table->decimal('total', 8, 2)->comment('商品总价');
            $table->unsignedSmallInteger('num')->comment('商品数量');
            $table->string('title')->comment('商品名');
            $table->string('lists')->comment('型号 规格');
            $table->string('img')->comment('照片');
            $table->text('desc')->comment('快照');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('orderlists');
    }
}
